package top.lidee.module.clientApi.controller;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import top.lidee.common.dto.UserInfo;
import top.lidee.common.service.CateService;
import top.lidee.common.util.TokenUtil;
import top.lidee.framework.enums.CommonExceptionEnum;
import top.lidee.framework.result.ResponseResult;
import top.lidee.repository.model.MtGoodsCate;


import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 张一恒
 * @version 1.0
 * @description: 商品分类
 * @date 2024/9/25 10:22
 */
@Api(tags="会员端-商品分类")
@RestController
@AllArgsConstructor
@RequestMapping(value = "/clientApi/goodsCate")
public class ClientGoodsCateController {

    private final CateService cateService;

    /**
     * 查询分类
     */
    @RequestMapping(value = "/list", method = RequestMethod.GET)
    @ApiOperation(value = "查询分类")
    public ResponseResult uploadLicense() {

        List<MtGoodsCate> list = cateService.list(Wrappers.<MtGoodsCate>lambdaQuery()
                .eq(MtGoodsCate::getStatus,"A"));

        return ResponseResult.okResult(list);
    }




}
